<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-html</title>
</head>

<body>

    <script src="../js/vue.js"></script>

    <!-- <div id="root">{{name}}</div> -->

    <!-- v-html 和 v-text直接区别 -->
    <div id="root">
        <div v-html="name"></div>
        <div v-text="name"></div>
    </div>




    <script>
        var root = new Vue({
            el: "#root",
            data: {
                // name: "百度一下"
                name: "<a href='http://www.baidu.com'>百度一下</a>"
            }
        })
    </script>
</body>

</html>